/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package csci6450.chickenFriedFS.nuggetCore;

import java.text.SimpleDateFormat;
import java.util.Comparator;

/**
 *
 * @author jacobschoen
 */
public class NuggetConstants {

    //constants used for issuing commands from the Meta Server. 
    public final static String STOP = "STOP";
    public final static String TIMESTAMP = "TIMESTAMP";
    public final static String PUT = "PUT";
    public final static String GET = "GET";
    public final static String RM = "RM";
    public final static String LS = "LS";
    public final static String DF = "DF";
    public final static String FORMAT = "FORMAT";
    public static final String SUCCESS = "SUCCESS";
    public static final String FAILURE = "FAILURE";
    //Things for the NuggetLog class
    public static final String SEPARATOR = "|";
    public static final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss z");
    public static final String ADD = "ADD";
    public static final String REMOVE = "REMOVE";
    //Things for Nuggets
    public static final Comparator NUGGET_POS_COMPARATOR =
            new Comparator() {

                public int compare(Object o1, Object o2) {
                    Integer i1 = ((Nugget) o1).getNuggetPosition();
                    Integer i2 = ((Nugget) o2).getNuggetPosition();
                    return i1.compareTo(i2);
                }
            };
    public static final long CHUNK_SIZE = 64000000;
    public static String NEWLINE = System.getProperty("line.separator");
}
